package com.sanctuary.services;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.sanctuary.interfaces.Product;
import com.sanctuary.products.HtmlProduct;

public class HomePage extends BaseService {
	private static final Log LOG = LogFactory.getLog(HomePage.class);
	private String productArg;
	
	public HomePage(String productArg) {
		super();
		this.productArg = productArg;
	}
	@Override
	public Product execute() throws Exception {
		Product p = new HtmlProduct();
		
		Map<String,Object> content = new HashMap<String,Object>();
		content.put("message","this is the home page");
		p.setWriter(writer);
		p.setCompleted(productArg, request, response, template, content);
		return p;
	}

	@Override
	public boolean isWriter() {
		return true;
	}

}
